package com.appkubes.mall.core.pojo;

import com.appkubes.mall.core.po.MallGoodsTags;
import com.appkubes.mall.core.po.MallGoodsTagsExample;
import java.util.List;
import org.apache.ibatis.annotations.Delete;
import org.apache.ibatis.annotations.DeleteProvider;
import org.apache.ibatis.annotations.Insert;
import org.apache.ibatis.annotations.InsertProvider;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Result;
import org.apache.ibatis.annotations.Results;
import org.apache.ibatis.annotations.Select;
import org.apache.ibatis.annotations.SelectProvider;
import org.apache.ibatis.annotations.Update;
import org.apache.ibatis.annotations.UpdateProvider;
import org.apache.ibatis.session.RowBounds;
import org.apache.ibatis.type.JdbcType;

public interface MallGoodsTagsMapper {
    /**
     * This method was generated by MyBatis Generator.
     * This method corresponds to the database table mall_goods_tags
     *
     * @mbg.generated
     */
    @SelectProvider(type=MallGoodsTagsSqlProvider.class, method="countByExample")
    long countByExample(MallGoodsTagsExample example);

    /**
     * This method was generated by MyBatis Generator.
     * This method corresponds to the database table mall_goods_tags
     *
     * @mbg.generated
     */
    @DeleteProvider(type=MallGoodsTagsSqlProvider.class, method="deleteByExample")
    int deleteByExample(MallGoodsTagsExample example);

    /**
     * This method was generated by MyBatis Generator.
     * This method corresponds to the database table mall_goods_tags
     *
     * @mbg.generated
     */
    @Delete({
        "delete from mall_goods_tags",
        "where goodstags_key = #{goodstagsKey,jdbcType=VARCHAR}"
    })
    int deleteByPrimaryKey(String goodstagsKey);

    /**
     * This method was generated by MyBatis Generator.
     * This method corresponds to the database table mall_goods_tags
     *
     * @mbg.generated
     */
    @Insert({
        "insert into mall_goods_tags (goodstags_key, app_key, ",
        "tags_name, tags_content, ",
        "`state`, `index`, cteate_time, ",
        "update_time, version)",
        "values (#{goodstagsKey,jdbcType=VARCHAR}, #{appKey,jdbcType=VARCHAR}, ",
        "#{tagsName,jdbcType=VARCHAR}, #{tagsContent,jdbcType=VARCHAR}, ",
        "#{state,jdbcType=TINYINT}, #{index,jdbcType=INTEGER}, #{cteateTime,jdbcType=TINYINT}, ",
        "#{updateTime,jdbcType=TINYINT}, #{version,jdbcType=INTEGER})"
    })
    int insert(MallGoodsTags record);

    /**
     * This method was generated by MyBatis Generator.
     * This method corresponds to the database table mall_goods_tags
     *
     * @mbg.generated
     */
    @InsertProvider(type=MallGoodsTagsSqlProvider.class, method="insertSelective")
    int insertSelective(MallGoodsTags record);

    /**
     * This method was generated by MyBatis Generator.
     * This method corresponds to the database table mall_goods_tags
     *
     * @mbg.generated
     */
    @SelectProvider(type=MallGoodsTagsSqlProvider.class, method="selectByExample")
    @Results({
        @Result(column="goodstags_key", property="goodstagsKey", jdbcType=JdbcType.VARCHAR, id=true),
        @Result(column="app_key", property="appKey", jdbcType=JdbcType.VARCHAR),
        @Result(column="tags_name", property="tagsName", jdbcType=JdbcType.VARCHAR),
        @Result(column="tags_content", property="tagsContent", jdbcType=JdbcType.VARCHAR),
        @Result(column="state", property="state", jdbcType=JdbcType.TINYINT),
        @Result(column="index", property="index", jdbcType=JdbcType.INTEGER),
        @Result(column="cteate_time", property="cteateTime", jdbcType=JdbcType.TINYINT),
        @Result(column="update_time", property="updateTime", jdbcType=JdbcType.TINYINT),
        @Result(column="version", property="version", jdbcType=JdbcType.INTEGER)
    })
    List<MallGoodsTags> selectByExampleWithRowbounds(MallGoodsTagsExample example, RowBounds rowBounds);

    /**
     * This method was generated by MyBatis Generator.
     * This method corresponds to the database table mall_goods_tags
     *
     * @mbg.generated
     */
    @SelectProvider(type=MallGoodsTagsSqlProvider.class, method="selectByExample")
    @Results({
        @Result(column="goodstags_key", property="goodstagsKey", jdbcType=JdbcType.VARCHAR, id=true),
        @Result(column="app_key", property="appKey", jdbcType=JdbcType.VARCHAR),
        @Result(column="tags_name", property="tagsName", jdbcType=JdbcType.VARCHAR),
        @Result(column="tags_content", property="tagsContent", jdbcType=JdbcType.VARCHAR),
        @Result(column="state", property="state", jdbcType=JdbcType.TINYINT),
        @Result(column="index", property="index", jdbcType=JdbcType.INTEGER),
        @Result(column="cteate_time", property="cteateTime", jdbcType=JdbcType.TINYINT),
        @Result(column="update_time", property="updateTime", jdbcType=JdbcType.TINYINT),
        @Result(column="version", property="version", jdbcType=JdbcType.INTEGER)
    })
    List<MallGoodsTags> selectByExample(MallGoodsTagsExample example);

    /**
     * This method was generated by MyBatis Generator.
     * This method corresponds to the database table mall_goods_tags
     *
     * @mbg.generated
     */
    @Select({
        "select",
        "goodstags_key, app_key, tags_name, tags_content, `state`, `index`, cteate_time, ",
        "update_time, version",
        "from mall_goods_tags",
        "where goodstags_key = #{goodstagsKey,jdbcType=VARCHAR}"
    })
    @Results({
        @Result(column="goodstags_key", property="goodstagsKey", jdbcType=JdbcType.VARCHAR, id=true),
        @Result(column="app_key", property="appKey", jdbcType=JdbcType.VARCHAR),
        @Result(column="tags_name", property="tagsName", jdbcType=JdbcType.VARCHAR),
        @Result(column="tags_content", property="tagsContent", jdbcType=JdbcType.VARCHAR),
        @Result(column="state", property="state", jdbcType=JdbcType.TINYINT),
        @Result(column="index", property="index", jdbcType=JdbcType.INTEGER),
        @Result(column="cteate_time", property="cteateTime", jdbcType=JdbcType.TINYINT),
        @Result(column="update_time", property="updateTime", jdbcType=JdbcType.TINYINT),
        @Result(column="version", property="version", jdbcType=JdbcType.INTEGER)
    })
    MallGoodsTags selectByPrimaryKey(String goodstagsKey);

    /**
     * This method was generated by MyBatis Generator.
     * This method corresponds to the database table mall_goods_tags
     *
     * @mbg.generated
     */
    @UpdateProvider(type=MallGoodsTagsSqlProvider.class, method="updateByExampleSelective")
    int updateByExampleSelective(@Param("record") MallGoodsTags record, @Param("example") MallGoodsTagsExample example);

    /**
     * This method was generated by MyBatis Generator.
     * This method corresponds to the database table mall_goods_tags
     *
     * @mbg.generated
     */
    @UpdateProvider(type=MallGoodsTagsSqlProvider.class, method="updateByExample")
    int updateByExample(@Param("record") MallGoodsTags record, @Param("example") MallGoodsTagsExample example);

    /**
     * This method was generated by MyBatis Generator.
     * This method corresponds to the database table mall_goods_tags
     *
     * @mbg.generated
     */
    @UpdateProvider(type=MallGoodsTagsSqlProvider.class, method="updateByPrimaryKeySelective")
    int updateByPrimaryKeySelective(MallGoodsTags record);

    /**
     * This method was generated by MyBatis Generator.
     * This method corresponds to the database table mall_goods_tags
     *
     * @mbg.generated
     */
    @Update({
        "update mall_goods_tags",
        "set app_key = #{appKey,jdbcType=VARCHAR},",
          "tags_name = #{tagsName,jdbcType=VARCHAR},",
          "tags_content = #{tagsContent,jdbcType=VARCHAR},",
          "`state` = #{state,jdbcType=TINYINT},",
          "`index` = #{index,jdbcType=INTEGER},",
          "cteate_time = #{cteateTime,jdbcType=TINYINT},",
          "update_time = #{updateTime,jdbcType=TINYINT},",
          "version = #{version,jdbcType=INTEGER}",
        "where goodstags_key = #{goodstagsKey,jdbcType=VARCHAR}"
    })
    int updateByPrimaryKey(MallGoodsTags record);
}